#!/bin/sh 

for file in `find ./ -name "*.*"`;do
	newFile=`echo $file | sed 's/\.[0-9]*$//g' | sed 's/\.[0-9]*\.txt/.txt/g' | sed 's/\.[0-9]\{1,\}\//\//g'`
	mv $file $newFile 
done 

